package com.example.administrator.ygddriver.order.specific;

import android.graphics.Color;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.administrator.ygddriver.R;

import java.util.List;

public class SpecificIntoAdapter extends BaseQuickAdapter<PickUpInfoRequestBean.ResultBean.CostomerWaybillBean, BaseViewHolder> {
    public SpecificIntoAdapter(int layoutResId, @Nullable List<PickUpInfoRequestBean.ResultBean.CostomerWaybillBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, PickUpInfoRequestBean.ResultBean.CostomerWaybillBean item) {
        helper.setText(R.id.item_specific_into_waybill_tv, item.getC_waybill());
        helper.setText(R.id.item_specific_into_number_tv, "共"+item.getC_number()+"件");
        if (item.getC_status().equals("4")){
            helper.setTextColor(R.id.item_specific_into_status_tv,Color.parseColor("#000000"));
            helper.setText(R.id.item_specific_into_status_tv, "未揽件");
        }else {
            helper.setTextColor(R.id.item_specific_into_status_tv,Color.parseColor("#17b302"));
            helper.setText(R.id.item_specific_into_status_tv, "已揽件");

        }


    }
}
